import time


class OperateLog:
    def __init__(self, id: str, user_name: str, level: str, operate: str,
                 create_time: int):
        self.id = id
        self.user_name = user_name
        self.level = level
        self.operate = operate
        self.create_time = create_time

    def __str__(self):
        return f"{self.id}:{self.user_name}:{self.level}:{self.operate}:{time.strftime('%Y-%m-%d %H:%M:%S', self.create_time)}"
